package com.blog.boot.api.system;

import com.blog.boot.api.annotation.AutoIncKey;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Set;

/**
 * @author : cailong
 * @since : Created in 上午 11:41 2018/12/17 0017
 * 用户角色
 */
@Data
@Document(collection = "b_role")
public class Role {
    @AutoIncKey
    @Id
    private Long id = 0L;// 为什么赋了默认值？文章后说明
    @Field
    private String roleKey;
    @Field
    private String roleValue;
    @Field
    private String description;
    @Field
    private Set<Integer> permissions;
}
